﻿using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters;
using Microsoft.AspNetCore.Mvc.Routing;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace WeChat.PlatForm.API
{
    public class OuthApiFilter : IAuthorizationFilter
    {
        /// <summary>
        /// 筛选器
        /// </summary>
        /// <param name="context"></param>
        public void OnAuthorization(AuthorizationFilterContext context)
        {
            //AttributeRouteInfo name = context.ActionDescriptor.AttributeRouteInfo;
            //var o = context.ActionDescriptor.ActionConstraints;
            //var ok = context.ActionDescriptor.BoundProperties;
            //var k = context.ActionDescriptor.FilterDescriptors;
            //var oo = context.ActionDescriptor.Parameters;
            //var kk = context.ActionDescriptor.Properties;
            //var kko = context.ActionDescriptor.RouteValues;

            //string s = name.Name;

            //ContentResult content = new ContentResult();
            //content.Content = "哥哥把你拦截了吧";
            //context.Result = content;
        }
    }
}
